{template 'public/header'}
{template 'public/comhead'}
<link rel="stylesheet" type="text/css" href="../addons/zh_tcwq/template/public/ygcss.css">
<style type="text/css">
    /*#frame-5{display: block;visibility: visible;}*/
  .yg_inp>input{margin-bottom: 10px;}
</style>
<ul class="nav nav-tabs">    
    <span class="ygxian"></span>
    <div class="ygdangq">当前位置:</div>
    <li><a href="{php echo $this->createWebUrl('ddgl')}">订单管理</a></li>
    <li class="active"><a href="javascript:void(0);">添加/编辑订单</a></li>
</ul>
<div class="main">
    <form action="" method="post" class="form-horizontal form" enctype="multipart/form-data" id="invitative">
        <div class="panel panel-default ygdefault">
            <div class="panel-heading wyheader">
                订单管理&nbsp;>&nbsp;添加/编辑订单
            </div>
            <div class="panel-body">
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">订单号</label>
                    <div class="col-sm-9">
                        <input type="text" name="order_num" value="{$item['order_num']}" id="web_name" class="form-control" readonly/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">下单时间</label>
                    <div class="col-sm-9">
                        <input type="text" name="time" value="{$item['time']}" id="web_name" class="form-control" readonly/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">客户姓名</label>
                    <div class="col-sm-9">
                        <input type="text" name="user_name" value="{$item['user_name']}" id="web_name" class="form-control" readonly/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">客户电话</label>
                    <div class="col-sm-9">
                        <input type="text" name="tel" value="{$item['tel']}" id="web_name" class="form-control" readonly/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">客户地址</label>
                    <div class="col-sm-9">
                        <input type="text" name="address" value="{$item['address']}" id="web_name" class="form-control" readonly/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">价格</label>
                    <div class="col-sm-9">
                        <input type="text"  onkeyup="value=value.replace(/[^\d.]/g,'')" name="money" value="{$item['money']}" id="web_name" class="form-control" readonly/>
                    </div>
                </div>
               <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">商品名称</label>
                    <div class="col-sm-9">
                        <input type="text" name="good_name" value="{$item['good_name']}" id="web_name" class="form-control" readonly/>
                    </div>
                </div>
               <!--   <div class="form-group">
                  <label class="col-xs-12 col-sm-3 col-md-2 control-label">商品规格</label>
                  <div class="col-sm-9">
                      <input type="text" name="good_spec" value="{$item['good_spec']}" id="web_name" class="form-control" readonly/>
                  </div>
                               </div> -->
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">备注</label>
                    <div class="col-sm-9">
                        <input type="text" name="note" value="{$item['note']}" id="web_name" class="form-control" readonly/>
                    </div>
                </div>
               
{if $item['state']==1}

   <div class="form-group">

   <label class="col-xs-12 col-sm-3 col-md-2 control-label">下单时间</label>

    <div class="col-sm-9 yg_inp">

      <input type="text"   value="{php echo date('Y-m-d H:i',$item['time'])}" class="form-control" id="inputEmail3" readonly>

    </div>

  </div>

{/if} 

{if $item['state']==2}

   <div class="form-group">

   <label class="col-xs-12 col-sm-3 col-md-2 control-label">付款时间</label>

    <div class="col-sm-9 yg_inp">

      <input type="text"   value="{php echo date('Y-m-d H:i',$item['pay_time'])}" class="form-control" id="inputEmail3" readonly>

    </div>

  </div>

{/if} 
 {if $item['state']==3}

   <div class="form-group">

    <label class="col-xs-12 col-sm-3 col-md-2 control-label">发货时间</label>

   <div class="col-sm-9 yg_inp">

      <input type="text"   value="{php echo date('Y-m-d H:i',$item['fh_time'])}" class="form-control" id="inputEmail3" readonly>

    </div>

  </div>

{/if}

 {if $item['state']==4}

   <div class="form-group">

    <label class="col-xs-12 col-sm-3 col-md-2 control-label">完成时间</label>

   <div class="col-sm-9 yg_inp">

      <input type="text"   value="{php echo date('Y-m-d H:i',$item['pay_time'])}" class="form-control" id="inputEmail3" readonly>

    </div>

  </div>

{/if}


                
                 <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">状态</label>
                    <div class="col-sm-9">
                            <select name="state" class="col-md-4">
                            {if $item['state']==1}
                            <option value="1" selected>待付款</option>
                            <option value="2" >待发货</option>
                            <option value="3" >待收货</option>
                            <option value="4" >已完成</option>
                            <option value="5" >退款中</option>
                            <option value="6" >已退款</option>
                            <option value="7" >拒绝退款</option>
                            {elseif $item['state']==2}
                            <option value="1" >待付款</option>
                            <option value="2" selected>待发货</option>
                            <option value="3" >待收货</option>
                            <option value="4" >已完成</option>
                            <option value="5" >退款中</option>
                            <option value="6" >已退款</option>
                            <option value="7" >拒绝退款</option>
                            {elseif $item['state']==3}
                            <option value="1" >待付款</option>
                            <option value="2">待发货</option>
                            <option value="3"  selected>待收货</option>
                            <option value="4" >已完成</option>
                            <option value="5" >退款中</option>
                            <option value="6" >已退款</option>
                            <option value="7" >拒绝退款</option>
                            {elseif $item['state']==4}
                            <option value="1" >待付款</option>
                            <option value="2">待发货</option>
                            <option value="3">待收货</option>
                            <option value="4" selected>已完成</option>
                            <option value="5" >退款中</option>
                            <option value="6" >已退款</option>
                            <option value="7" >拒绝退款</option>
                            {elseif $item['state']==5}
                            <option value="1" >待付款</option>
                            <option value="2">待发货</option>
                            <option value="3">待收货</option>
                            <option value="4" >已完成</option>
                            <option value="5" selected>退款中</option>
                            <option value="6" >已退款</option>
                            <option value="7" >拒绝退款</option>
                            {elseif $item['state']==6}
                            <option value="1" >待付款</option>
                            <option value="2">待发货</option>
                            <option value="3">待收货</option>
                            <option value="4" >已完成</option>
                            <option value="5" >退款中</option>
                            <option value="6" selected>已退款</option>
                            <option value="7" >拒绝退款</option>
                            {elseif $item['state']==7}
                            <option value="1" >待付款</option>
                            <option value="2">待发货</option>
                            <option value="3">待收货</option>
                            <option value="4" >已完成</option>
                            <option value="5" >退款中</option>
                            <option value="6" >已退款</option>
                            <option value="7" selected>拒绝退款</option>
                          
                            {else}
                           <option value="1" >待付款</option>
                            <option value="2">待发货</option>
                            <option value="3">待收货</option>
                            <option value="4" >已完成</option>
                            <option value="5" >退款中</option>
                            <option value="6" >已退款</option>
                            <option value="7">拒绝退款</option>
                            {/if}
                            </select>
                    </div>
                </div>
                
<!-- <div class="form-group">
    <label class="col-xs-12 col-sm-3 col-md-2 control-label">备注</label>
     <div class="col-sm-9 yg_inp">
      <input type="text" value="{$item['note']}" class="form-control" id="inputEmail3" readonly>
    </div>
  </div> -->


            </div>
        </div>
        
       
        <div class="form-group">
        <a class="btn col-lg-3" style="color: white;background-color: #44ABF7;" href="{php echo $this->createWebUrl('ddgl');}">返回列表</a>
      <!--    <input class="btn col-lg-3 col-lg-push-1" style="color: white;background-color: #31C2A5;" type="submit" name="submit" value="修改" /> -->
            <input type="hidden" name="token" value="{$_W['token']}" />
            <input type="hidden" name="id" value="{$item['id']}" />

        </div>
    </form>
</div>
<!-- {template 'common/footer'} -->
<script type="text/javascript">
    $(function(){
        $("#frame-7").show();
        $("#yframe-7").addClass("wyactive");
    })
</script>